package com.frxuexi.mine.ui

import androidx.compose.foundation.clickable
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.navigation.NavHostController
import com.frxuexi.lib_base.NavPath
import com.tencent.mmkv.MMKV

@Composable
fun MinePage(navHostController: NavHostController) {

    var name by remember {
        mutableStateOf("未登录")
    }
    name = MMKV.defaultMMKV().decodeString("name", "未登录").toString()

    Text(text = name, modifier = Modifier.clickable {
        if(name=="未登录")
            navHostController.navigate(NavPath.LOGIN)
    })
}